package org.black.phoneUtility.sms.schedule.content.broadcastReceiver;

import org.black.phoneUtility.sms.schedule.SmsScheduleConstant;

import android.app.Activity;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.util.Log;

public class DeliverySmsBroadcastReceiver extends BroadcastReceiver {

	private static final String LOG_TAG = DeliverySmsBroadcastReceiver.class
			.getName();

	@Override
	public void onReceive(Context context, Intent intent) {
		if (SmsScheduleConstant.SMS_DELIVERY_INTENT.equals(intent.getAction())) {
			int resultCode = getResultCode();
			Log.d(LOG_TAG, "result code : " + resultCode);
			switch (resultCode) {
			case Activity.RESULT_OK:
				Log.d(LOG_TAG, "Delivery OK!");
				break;
			case Activity.RESULT_CANCELED:
				Log.d(LOG_TAG, "Delivery Cancel!");
				break;
			}
		}
	}

}
